package com.example.mp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mp.bean.Employee;
import com.example.mp.mapper.EmployeeMapper;
import com.example.mp.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @auther liujb
 * @date 2021/7/24-21:49
 */
@Service
public class EmployeeServerImpl extends ServiceImpl<EmployeeMapper, Employee> implements IEmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public int removeAll() {
        return employeeMapper.removeAll();
    }

    @Override
    public Map<Integer, Employee> getEmpByLastNameReturnMap(String lastName) {
        return employeeMapper.getEmpByLastNameReturnMap(lastName);
    }

    @Override
    public Employee getEmpByIdStep(Integer id) {
        return employeeMapper.getEmpByIdStep(id);
    }

    @Override
    public List<Employee> getEmpsByDeptId(Integer dId) {
        return employeeMapper.getEmpsByDeptId(dId);
    }
}
